import axios from 'axios'
import {
  commonParams
} from './config'

export function getLyric(mid) {
  const url = `/lyric?songmid=${mid}`
  // const data = Object.assign({}, commnParams, {
  //   songmid: mid,
  //   pcachetime: new Date(),
  //   platform: 'yqq.json',
  //   hostUin: 0,
  //   needNewCode: 0,
  //   g_tk: 364982875,
  //   format: 'json',
  //   '-': 'MusicJsonCallback_lrc'
  // })

  return axios.get(url).then((res) => {
    return Promise.resolve(res.data)
  })
}